body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background-color: #f0f9ff;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    color: #2c5282;
    font-size: 2.5em;
    margin-bottom: 30px;
}

.game-controls {
    margin: 20px 0;
}

button {
    background-color: #4299e1;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s;
}

button:hover {
    transform: scale(1.1);
    background-color: #3182ce;
}

.numbers-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
    margin: 30px 0;
    gap: 10px;
}

.number-box {
    width: 60px;
    height: 60px;
    background-color: #63b3ed;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    left: 0;
}

.number-box.comparing {
    background-color: #f99737;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(249, 151, 55, 0.5);
}

.number-box.sorted {
    background-color: #48bb78;
    transition: background-color 0.3s ease;
}

.explanation {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
}

#currentStep {
    margin-top: 10px;
    color: #4a5568;
    font-size: 1.1em;
    line-height: 1.6;
}

/* 添加交换动画相关样式 */
.number-box.swap-right {
    animation: swapRight 1s ease;
}

.number-box.swap-left {
    animation: swapLeft 1s ease;
}

@keyframes swapRight {
    0% { transform: translateX(0); }
    25% { transform: translateX(20px) translateY(-20px); }
    75% { transform: translateX(70px) translateY(-20px); }
    100% { transform: translateX(70px); }
}

@keyframes swapLeft {
    0% { transform: translateX(0); }
    25% { transform: translateX(-20px) translateY(20px); }
    75% { transform: translateX(-70px) translateY(20px); }
    100% { transform: translateX(-70px); }
}

.header {
    position: relative;
    margin-bottom: 30px;
}

.back-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
    color: #4299e1;
    font-size: 1.1em;
    padding: 10px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background-color: #ebf8ff;
    color: #2b6cb0;
} 